﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ErrorDisplay.ascx.cs" company="Scrum for Team System">
//   None.
// </copyright>
// <summary>
//   Defines the ErrorDisplay2 type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;

namespace ScrumForTeamSystem.WebControls.Common
{
    public partial class ErrorDisplay2 : System.Web.UI.UserControl
    {
        public string ErrorMessage
        {
            get { return ViewState["ErrorMessage"].ToString(); }
            set { ViewState["ErrorMessage"] = value; }
        }

        protected override void OnPreRender(EventArgs e)
        {
            this.lblErrorMessage.Text = ErrorMessage;
            this.lblErrorMessage.Visible = !string.IsNullOrEmpty(ErrorMessage);

            base.OnPreRender(e);
        }
    }
}